package com.hlpedu.pojo;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Data
@Component
@PropertySource("classpath:values.properties")
public class Dog {
    //@Value("小黑")
    @Value("${d.name}")
    private String name;
    //@Value("3")
    @Value("${d.age}")
    private Integer age;
}
